package com.starview.star.compiler.type;

import com.starview.star.compiler.canonical.Variable;
import com.starview.star.compiler.transform.VarAnalysis.VarChecker;

public class DictionaryChecker implements VarChecker
{
  private final Dictionary dict;

  public DictionaryChecker(Dictionary dict)
  {
    this.dict = dict;
  }

  @Override
  public boolean isThisOk(Variable var)
  {
    return !dict.isDeclaredVar(var.getName());
  }

}
